package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.entity.result.HouseTypesBean;
import com.common.retrofit.entity.result.RegisterBean;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class GetHouseTypesMethods extends BaseMethods {

    private static GetHouseTypesMethods m_ins = null;

    public static GetHouseTypesMethods getInstance() {
        if (m_ins == null) {
            synchronized (GetHouseTypesMethods.class) {
                if (m_ins == null) {
                    m_ins = new GetHouseTypesMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "House/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void getHouseTypes(Subscriber<HouseTypesBean> subscriber ,String city_str
    ) {
        Observable observable = initService().getHouseTypes(System.currentTimeMillis()+"",
                "f478901fb722f28d73ddf2ed46f980ca" ,city_str
        );
        toSubscribe(observable, subscriber);
    }
}
